/*
 * @Author: canlong.shen
 * @Date: 2021-10-22 16:04:17
 * @LastEditors: your name
 * @LastEditTime: 2021-10-22 17:11:17
 * @Description: file content
 */
import Vue from "vue"                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          
import Vuex from "vuex"
import createStore from './store'
import Counter from './components/Counter'
Vue.use(Vuex)
const store = createStore()


const app = new Vue({
    el: "#app",
    store,
    components: {
        Counter,
    },
    template: `<div>
               <Counter></Counter>
              </div>`,
})

console.log("before", store.state.count)
store.commit("increment")
console.log("after", store.state.count)